"""
@Project:che
@File:user.py
@Author:马可
@Date:上午 10:55
"""
from flask import Blueprint, jsonify, make_response, request
from flask_restful import Resource, Api, reqparse, marshal

from models.config import user_info
from models.model import *


user_bp = Blueprint('user_bp', __name__, url_prefix='/user')

api = Api(user_bp)

# 进入小区
class Users(Resource):
    def post(self):
        req = reqparse.RequestParser()
        req.add_argument('plate')
        args = req.parse_args()

        user = User.query.all()
        return jsonify({
            'code':200,
            'msg':'cg',
            'data':marshal(user, user_info)
        })















api.add_resource(Users,'/user')



